# encoding: utf-8
# @project: st2111 
# @file: re_groups_match.py
# @time: 2023/4/13 14:20
# @author: abcque
# @license: (C) Copyright 2013-2021
# @contact: abcque@outlook.com
# @IDE: PyCharm
# @desc:
from chapter5.regular_expression.testre.re_test_patterns import test_patterns

if __name__ == "__main__":
    text = 'This is some text -- with punctuation.'

    patterns = [
        (r"^(\w)+", "匹配串开始的词"),
        (r"(\w)+\S*$", "匹配串开始的词"),
        (r"\bt(\w)+\b", "以字符 t 开头的词"),
        (r"\b(\w)+t\b", "以字符 t 结尾的词"),
    ]

    test_patterns(text=text, patterns=patterns)
